(function(){
    
    Responsive = {

        type     : 'desktop',
        width    : 0,
        height   : 0,

        fireEvent: function(){

            var me = this;

            if ($.browser.msie && parseInt($.browser.version, 10) <= 7){
                    me.width = document.body.offsetWidth;
                    me.height = document.body.offsetHeight;
            }
            else{
                    me.width =  $(window).width();
                    me.height =  $(window).height();
            }

            if(me.width >= 960)
                    me.type = 'desktop';
            else if(me.width < 960 && me.width >= 624)
                    me.type = 'tablet';
            else if(me.width < 624)
                    me.type = 'mobile';

            $(document).trigger('responsive',{ 
                                                type    : me.type, 
                                                width   : me.width, 
                                                height  : me.height 
                                            }
            );
                

            
        },

        listener:function()
        {
            var me = this;
            
            $(document).ready(function(){
                me.fireEvent();
                
                $(window).resize(function(){
                    me.fireEvent();
                });
                
            });
        }


    };

    Responsive.listener();
    

})();
